package com.lineage.server.clientpackets;

import com.lineage.echo.ClientExecutor;
import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.serverpackets.S_Paralysis;
import com.lineage.server.serverpackets.ServerBasePacket;
import com.lineage.server.utils.Teleportation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class C_Teleport extends ClientBasePacket {
  private static final Log _log = LogFactory.getLog(C_Teleport.class);
  
  public void start(byte[] decrypt, ClientExecutor client) {
    try {
      L1PcInstance pc = client.getActiveChar();
      if (pc == null)
        return; 
      pc.sendPackets((ServerBasePacket)new S_Paralysis(7, false));
      Teleportation.teleportation(pc);
    } catch (Exception exception) {
    
    } finally {
      over();
    } 
  }
  
  public String getType() {
    return getClass().getSimpleName();
  }
}
